home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mesolore
/
Mesolore - Disc 1.iso
/
mac
/
data
/
Buttons.cst
/
00274_Script_dispatcher
< prev
next >
Wrap
Text File
|
2001-04-13
|
6KB
|
206 lines
Global gRetraceList,gwhichCD,gTargetMovie, gTargetFrame, gHtmlPath, gwinCDLetter, ginstallPath, gFullInstall
on New me
if the runmode = "sauthor" then
if the platform contains "Macintosh" then
gInstallPath = "macintosh hd:mesolore:"
else
gInstallPath = "c:windows\desktop\mesolore\"
gwincdletter = "e:"
end if
else
if me.checkForFullInstall() then
gFullInstall = TRUE
end if
if the platform contains "Macintosh" then
gInstallPath = the moviePath
-- alert gInstallpath
else
gwinCDLetter = me.findWinCD("cdinit.txt")
gInstallPath = the moviePath
end if
end if
if the platform contains "Macintosh" then
set the searchPaths = [the moviepath,"mesolore1:data:video","mesolore1:mesolore1:data:video"] --- new!!
else
set the searchPaths = [the moviepath,gwinCDLetter & "\data\video",gwinCDLetter & "\mesolore1\data\video"]--- new!!
end if
return me
end
on goto me, whichFrame, whichmovie
if whichmovie contains "." then
set whichMovie = char 1 to (offset(".", whichmovie)-1) of whichmovie
end if
if value(whichFrame) <> void then set whichFrame = value(whichFrame)
--alert string( "wf= " & whichframe & "wm = " & whichmovie)
if whichmovie = void or the movie contains whichmovie then
set temp = the movie
set whichMovie = char 1 to (offset(".", temp)-1) of temp
cursor 4
go whichFrame
set where = whichFrame & "*" & whichMovie
add(gRetraceList, where)
else
cursor 4
set whichmoviepath = me.getMoviePath(whichmovie) & whichMovie ---!!!!!Builds movie path
--alert whichmoviepath
if me.checkforCD(whichmoviepath &".dir") then --- change if not using .dir files!!!-- if fullinstall, finds files on HD
oldmovie = the movie
go whichframe of movie whichmoviepath
-- alert string(the freebytes)
-- put oldmovie
unloadMovie (oldmovie)
-- put the result
updatestage
-- alert string(the freebytes)
set where = whichFrame & "*" & whichMovie
add(gRetraceList, where)
unload
updatestage
-- alert string(the freebytes)
else
gTargetMovie = whichMovie
gTargetFrame = whichFrame
go frame ("cd" & gwhichCD) of movie (gInstallPath & "switcher")--- set path!!!
end if
end if
cursor 0
end
on getMoviePath me, whichmovie
gwinCDLetter = me.findWinCD("cdinit.txt")--- new!!
if whichmovie = "debates" then
gwhichCD = 1
else
gwhichCD =2
end if
--if not(the runmode = "author") then --- to test projector in author modde
if the runmode = "author" then --- for release and true author mode
if the platform contains "Macintosh" then
return ginstallpath & "mesolore" & gwhichCD & ":data:"
else
return gwinCDLetter & "\data\"
end if
else
if gFullInstall and gwhichCD = 1 then
if the platform contains "Macintosh" then
return ginstallpath & "mesolore" & gwhichCD & ":data:"
else
return ginstallpath & "mesolore" & gwhichCD & "\data\"
end if
else--- new!!
if gWhichCD = 1 then --- if minimum install and cd = 1
if the platform contains "Macintosh" then
return "mesolore" & gwhichCD & ":mesolore1:data:"
else
return gwinCDLetter & "\mesolore1\data\"
end if
else
if the platform contains "Macintosh" then
return "mesolore" & gwhichCD & ":data:"
else
return gwinCDLetter & "\data\"
end if
end if--- new!! ^^^^^^^^^
end if
end if
end
on checkForFullInstall me
temp = me.checkForCD(the moviepath & "full_install.txt")
return temp
end
on checkForCD me,whFile
set fio = new(XTRA "fileio")
fio.openfile(whFile,1)
if fio.status() = 0 then
put "fio true"
return TRUE
else
put "fio false"
return FALSE
end if
fio.closefile()
fio = 0
end
on findWinCD me, whFile
set fio = new(XTRA "fileio")
repeat with x = 67 to 90
set drive= numtochar(x)
thisPath = string(drive & ":\" & whFile)
fio.openfile(thisPath,1)
--alert thispath
if fio.status() = 0 then
return drive & ":"
exit repeat
end if
end repeat
if x = 90 then
alert"no disk in drive"
end if
fio.closefile()
fio = 0
end
on netLink me, where
if the machinetype = 256 then
if gFullInstall then
gotoNetPage "file:\\\" & ginstallpath & "mesolore1\data\" & where
else
if not(me.checkforCD(gWinCDletter & "\mesolore1\data\Library\index.htm")) then --- new!!
gTargetMovie = "library"
gTargetFrame = where
if the frameLabel <> "cd1" then
go frame "cd1" of movie (gInstallPath & "switcher")
end if
else
cursor 4
gotoNetPage "file:\\\" & gWinCDLetter & "\mesolore1\data\" & where--- new!!
cursor 0
end if
end if
else
if gFullInstall then
temp = swapSlashes()
gotoNetPage "file:///" & temp & "mesolore1/data/" & where
else
if not(me.checkforCD("mesolore1:mesolore1:data:Library:index.htm")) then--- new!!
gTargetMovie = "library"
gTargetFrame = where
if the frameLabel <> "cd1" then
go frame "cd1" of movie (gInstallPath & "switcher")
end if
else
cursor 4
gotoNetPage "file:///mesolore1/mesolore1/data/" & where--- new!!
cursor 0
end if
end if
end if
end
on swapSlashes() --- for html
set temp = ginstallpath
repeat with x = 1 to the number of chars in temp
if char x of temp = ":" then
put "/" into char x of temp
end if
end repeat
return temp
end